package com.ah.shanxi_demo.mapper;

import com.ah.shanxi_demo.common.MyMapper;
import com.ah.shanxi_demo.entity.SxOrder;
import com.ah.shanxi_demo.param.input.OrderPO;
import com.ah.shanxi_demo.param.result.NowMonthDaysTimes;
import com.ah.shanxi_demo.param.result.OrderTypeRO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface SxOrderMapper extends MyMapper<SxOrder> {

    List<SxOrder> listBySelect(OrderPO orderPO);
    Integer listCountBySelect(OrderPO orderPO);
    Boolean deleteOrder(@Param("orderId") Long orderId);
    SxOrder selectById(@Param("orderId") Long orderId);

    //数据库插入工单列表
    Boolean insertOrder(SxOrder sxOrder);

    Integer selectByRepeat(SxOrder sxOrder);

    List<OrderTypeRO> selectOrderType(@Param("registerId") Long registerId);

    Integer selectOrderTrend(NowMonthDaysTimes nowMonthDaysTimes);

    String generalFinish(@Param("registerId") Long registerId);

    String generalUnFinish(@Param("registerId") Long registerId);

    Boolean handleOrderStatus(@Param("orderId") Long orderId, @Param("orderStatus") Integer orderStatus);

}